package com.easylinkin.linkappapi.grid.models.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.easylinkin.core.models.IOperator;
import com.easylinkin.core.models.Operator;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 周报保存 DTO
 *
 * @author kyj
 * @date 2024/5/16 17:54
 */
@ApiModel(description = "周报保存 DTO")
@Data
public class GridReportWeekSaveDTO implements IOperator, Serializable {

    /**
     * 填报截止时间
     */
    @ApiModelProperty(value = "填报截止时间", position = 1, required = true)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "填报截止时间不能为空")
    private LocalDateTime submitDeadline;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id", position = 2)
    @TableField(value = "user_id")
    private String userId;

    /**
     * 操作人
     */
    @ApiModelProperty(hidden = true)
    private Operator operator;
}
